﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace NJL.WebUsers.Controls
{
    public partial class WUEnterPriseSpaceLeftBaseInfo : BaseUserControl
    {
        private readonly NJL.BLL.NJL_COMPANY bllCompany = new BLL.NJL_COMPANY();
        protected NJL.Model.NJL_COMPANY modelCompany;
        protected string companyid;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                modelCompany = bllCompany.GetModel(Request.QueryString["id"].ToString());

                if (modelCompany != null)
                {
                    if (modelCompany.IMAGE_CODE != "")
                    {
                        Image1.ImageUrl = GetImageUrl(modelCompany.IMAGE_CODE, "C2");
                    }
                    else
                    {
                        Image1.ImageUrl = "~/Images/defaultShopHead.jpg";
                    }
                }

                if (UserId != "" && UserType == "1")
                {
                    modelCompany = bllCompany.GetCompanyByUserIDModel(UserId);
                    companyid = modelCompany.ID;
                }
            }
        }
    }
}